from django.conf.urls.defaults import *
from django.contrib import admin
from django.conf import settings

admin.autodiscover()

urlpatterns = patterns('',
  # Admin stuff
  (r'^admin/', include(admin.site.urls)),
  # Core stuff
  (r'', include('core.urls')),
  # Exam stuff
  (r'exams/', include('exams.urls')),
  # Student stuff
  (r'^student/', include('student.urls')),
  #Analysis stuff
  (r'^analysis/', include('analysis.urls')),
  
  # Search urls
  (r'^search/(?P<model>.+)/$', 'core.views.search'),
  (r'^get/(?P<model>.+)/(?P<pk>.+)/$', 'core.views.get_instance'),
)

if settings.DEBUG is True:
  urlpatterns += patterns('', (r'^media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}))
